package com.qidian.blog.util;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

/**
 * @author 戴着假发的程序员
 * @company 起点编程
 * 2022/10/12 15:40
 */
public class RedisTool {
    // jedis的连接信息应该写在配置文件中
    private static int port = 6379;
    private static String host = "192.168.66.132";
    private static JedisPool pool;
    static {
        pool = new JedisPool(host,port);
    }
    public static Jedis getResource(){
        return pool.getResource();
    }
}

